package cn.dbqn.controller;


import cn.dbqn.entity.Clientinfo;
import cn.dbqn.entity.View_gsxx;
import cn.dbqn.service.ClientinfoService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@Controller
public class ClientinfoController {
    @Resource
    ClientinfoService clientinfoService;

    @RequestMapping("/listkh")
    public String list(Model model){
        List<Clientinfo> list=clientinfoService.findAllKh();
        model.addAttribute("list",list);
        return "lyear_ui_cards";
    }


    //查询单个供商信息
    @ResponseBody
    @RequestMapping("khxx")
    public Object khxx(@RequestParam("cno")Integer cno){
        Clientinfo khxx=clientinfoService.khxx(cno);
        return khxx;
    }
}
